package cn.stard.feign;

import cn.stard.domian.Store;
import cn.stard.util.ajx;
import feign.hystrix.FallbackFactory;
import org.apache.ibatis.logging.stdout.StdOutImpl;
import org.springframework.stereotype.Component;

@Component
public class fack implements FallbackFactory<Storefeign> {
    @Override
    public Storefeign create(Throwable throwable) {
        return new Storefeign() {
            @Override
            public ajx add(Store store) {
                throwable.printStackTrace();
                System.out.println("降级页面访问成功");
                return new ajx().me().setSuccess(false).setMessage("请求降级");
            }
        };
    }
}
